﻿@using So.ImageResizer.Helpers

@{
    Style.Include("slimbox2.css");
    Script.Require("jQuery").AtFoot();
    Script.Include("slimbox2.js").AtFoot();
}
@if (!string.IsNullOrEmpty(Model.ContentField.FileNames))
{
    <div class="stripGallery">
        @foreach (var fileName in Model.ContentField.FileNames.Split(';'))
        {
            <a href="@fileName" rel="lightbox-gallery">
                @{ var alternateText = string.IsNullOrEmpty(Model.ContentField.AlternateText) ? Path.GetFileNameWithoutExtension(fileName) : Model.ContentField.AlternateText; }
                <img width="100" height="80" src='@string.Format("/resizedImage?url={0}&width=100&height=80&maxWidth=100&maxheight=80&cropMode={1}&scale={2}&stretchMode={3}", fileName, ResizeSettingType.CropMode.Auto, ResizeSettingType.ScaleMode.DownscaleOnly, ResizeSettingType.StretchMode.Proportionally)' alt="@alternateText"/>
            </a>
        }
    </div>
}